package jiali.test.easyfactory_2;

public class Main {
    public static void main(String[] args) {
        double total = 0d;
        CashSuper cashNormal = CashFactory.createCashSuper("1");
        CashSuper cashRebate = CashFactory.createCashSuper("2");
        CashSuper cashReturn = CashFactory.createCashSuper("3");
        double resultRebate = cashRebate.acceptCash(300, 2);
        total += resultRebate;
        double resultNormal = cashNormal.acceptCash(300, 2);
        total += resultNormal;
        double resultReturn = cashReturn.acceptCash(300, 2);
        total += resultReturn;
        System.out.println(resultNormal);
        System.out.println(resultRebate);
        System.out.println(resultReturn);
        System.out.println(total);
    }
}
